package com.feiyangedu.time;

import java.util.Calendar;

public class SetTime {
    public static void main(String[] args) throws Exception {
        Calendar c = Calendar.getInstance();
        System.out.println(c.getTime());
//        设置时间
        c.clear();
        c.set(Calendar.YEAR, 1999);
        c.set(Calendar.MONTH, 10);
        c.set(Calendar.DAY_OF_MONTH, 10);
        c.set(Calendar.HOUR_OF_DAY, 21);
        System.out.println(c.getTime());
    }
}
